"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const vue = require("vue");
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
  ...{
    name: "me-panel"
  },
  __name: "panel",
  props: {
    radius: { type: [Number, Boolean], default: false },
    borderd: { type: Boolean, default: true }
  },
  setup(__props) {
    const props = __props;
    const panelRef = vue.ref();
    vue.watchEffect(() => {
      const { radius, borderd } = props;
      vue.nextTick(() => {
        const headerDom = panelRef.value && panelRef.value.getElementsByClassName("me-panel-header")[0];
        const contentDom = panelRef.value && panelRef.value.getElementsByClassName("me-panel-content")[0];
        if (headerDom && contentDom) {
          headerDom.style.borderTopLeftRadius = radius === true ? "4px" : typeof radius === "number" ? `${radius}px` : "";
          headerDom.style.borderTopRightRadius = radius === true ? "4px" : typeof radius === "number" ? `${radius}px` : "";
          if (borderd) {
            headerDom.style.borderWidth = "1px";
            headerDom.style.borderStyle = "solid";
          }
          contentDom.style.borderBottomLeftRadius = radius === true ? "4px" : typeof radius === "number" ? `${radius}px` : "";
          contentDom.style.borderBottomRightRadius = radius === true ? "4px" : typeof radius === "number" ? `${radius}px` : "";
          if (borderd) {
            contentDom.style.borderWidth = "1px";
            contentDom.style.borderStyle = "solid";
          }
        }
      });
    });
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createElementBlock("div", {
        ref_key: "panelRef",
        ref: panelRef,
        class: "me-panel"
      }, [
        vue.renderSlot(_ctx.$slots, "default")
      ], 512);
    };
  }
});
exports.default = _sfc_main;
//# sourceMappingURL=panel.vue2.cjs.map
